<?xml version="1.0" encoding= "UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition template="/templates/common.xhtml">
	<ui:define name="content">
		<h:form>
			<pre></pre>
			<p:outputLabel value="Find user:" for="userName"
				style="margin-left: 20px" />
			<p:autoComplete id="userName" value="#{profileBean.userName}"
				completeMethod="#{profileBean.completeName}" forceSelection="true"
				style="margin-left: 20px" />
			<p:commandButton action="#{navigationBean.toCurrentUserPage()}"
				value="Search" ajax="false" style="margin-left: 20px">
			</p:commandButton>
			<pre></pre>
		</h:form>

		<p:panel header="Users of Social Network">
			<p:dataScroller value="#{profileBean.userList}" var="user">


				<h:link value=" #{user.firstName} #{user.lastName}"
					outcome="/user/main">
					<f:param name="id" value="#{user.userId}" />

				</h:link>

				<p:separator style="width:100%;height:1px" />

			</p:dataScroller>
			<p:commandButton value="Back" action="/home" style="margin-left:20px">
			</p:commandButton>

		</p:panel>




	</ui:define>

</ui:composition>


</html>

